/* eslint-disable max-classes-per-file */
import { JsonProperty, Serializable } from '@/plugins/reflect-metadata';

@Serializable()
export class WithdrawAccountConfig {
  @JsonProperty('id')
    id: number = 0;

  @JsonProperty('method')
    method: number = 1;

  @JsonProperty('account')
    account: string = '';

  @JsonProperty('accountName')
    accountName: string = '';

  get body() {
    return {
      method: this.method,
      account: this.account,
      accountName: this.accountName,
    };
  }

  get put() {
    return {
      id: this.id,
      method: this.method,
      account: this.account,
      accountName: this.accountName,
    };
  }
}

@Serializable()
export class WithdrawAccountItem {
  @JsonProperty('id')
    id: number = 0;

  @JsonProperty('method')
    method: number = 1;

  @JsonProperty('account')
    account: string = '';

  @JsonProperty('accountName')
    accountName: string = '';
}

@Serializable()
export default class WithdrawAccountList {
  @JsonProperty({ name: 'data', type: WithdrawAccountItem })
    data: WithdrawAccountItem[] = [];

  @JsonProperty('total')
    total: number = 0;
}
